package com.woniu.p2p.listener;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.woniu.p2p.excelservice.InBorrowService;
import com.woniu.p2p.vo.BorrowVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class InBorrowListener extends AnalysisEventListener<BorrowVo> {

    @Autowired
    InBorrowService inBorrowService;

    @Override
    public void invoke(BorrowVo borrowVo, AnalysisContext analysisContext) {
        inBorrowService.readExcel(borrowVo);
    }

    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {

    }
}
